1. Field of the Invention
This invention relates generally to digital video. More specifically, the present invention provides an apparatus and method for video recording, playback and other video processing.
2. Discussion of Prior Art
Digital video promises many advantages over traditional analog video, such as greater low-artifact compression, lower generational degradation and compatibility with other digital processing. However, analog video continues to predominate in many consumer applications, largely due to voluminous video data, system costs and a shortage of practical, efficient and easy-to-use capabilities.
Recently, new xe2x80x9cdigital-VCRsxe2x80x9d have emerged that provide prior VCR-like features in a consumer settop box (xe2x80x9cSTBxe2x80x9d) to which hard disk recording has been added. Referring now to a prior art video cassette recorder (VCR) in FIG. 1, there is seen a VCR 100 which includes, by way of example only, a processor 102, an MPEG-2 encoder 105, a decoder 109, as well as other off-the-shelf components. During recording, an analog video source signal (e.g. a cable broadcast signal) is digitized in an A-D converter 104, encoded subsequently in a MPEG-2 encoder 105, and then stored via data buffer 108 onto hard disk 109. During playback, stored video is decoded by MPEG-2 decoder 109, converted subsequently back to an analog signal by a D-A converter 110, and then the analog signal as an output is transmitted to a conventional standard definition television (xe2x80x9cSDTV,xe2x80x9d not shown in the drawing).
VCR 100 also enables other features. For example, control data transfer via a modem 101 enables such options as broadcast-guide based viewing, program selection and recording, and usage reporting. Buffered hard disk storage also enables such viewing options as broadcast video pause, review and zoom.
The use of an MPEG-2 encoder also facilitates a conventional-VCR type extended play feature. For example and as best shown in FIG. 2, a typical feed-forward MPEG-2 encoder is illustrated. Compression is provided primarily using macroblock (xe2x80x9cMBxe2x80x9d) based motion-compensated prediction (xe2x80x9cMCPxe2x80x9d) and quantization. MCP reduces bitrate by producing not only complete intra picture data (xe2x80x9cI-picturesxe2x80x9d), but also lower bitrate predicted and bi-directional (P and B) picture data, including predicted inter-picture motion or xe2x80x9cprediction data,xe2x80x9d generally illustrated as 1, and predicted versus actual-picture or xe2x80x9cprediction errorxe2x80x9d data, generally illustrated as 2. Prediction error data is also converted using a discrete cosine transform (xe2x80x9cDCTxe2x80x9d) 203 and then quantized by quantizer 204. The digital-VCR extended play feature simply increases MB quantization step sizes of new video content according to a user""s xe2x80x9crecord-qualityxe2x80x9d selection (e.g. high, medium or low quality), thereby further reducing its bitrate and resultant storage requirements.
Unfortunately, current digital-VCRs are directed at analog broadcast and display technologies, and are not compatible with a compressed video source. Current digital-VCRs are also prohibitively expensive for many consumers, due in part to the high cost of MPEG-2 encoders and system complexity, and are not operable with emerging compression, display formats or other capabilities. Among further deficiencies, while extended play mode reduces storage requirements for new content, it does not assure that a user""s goal (e.g. fitting a new program onto the hard disk) will be achieved.
Accordingly, there is a need for a digital video recording and playback system which is capable of operating in an all-digital broadcast environment. There is further a need for such a system that also provides greater efficiency and predictability, greater adaptability and easy-to-use, and determinable reduced bitrate storage at lower cost than that required by current hard disk enabled STBs.
In one embodiment of the present invention there is provided a digital video processing architecture which is capable of operating efficiently in an all-digital input (e.g. broadcast) environment and better enabling features including those currently associated with digital video devices. The embodiment also enables low cost determinable accommodation and/or modification of bitrate, quality and/or other aspects of a received video source, preferably in conjunction with providing such features.
In another embodiment of the present invention, there is provided a transcoder architecture for processing a compressed source bitstream and enabling conversion of the source bitstream into a second bitstream having a determinable bitrate or quality. There is also provided a low-cost, low-computation and extensible transcoder capable of determinable bitrate modification without performing motion estimation. In another aspect of the present invention, there is provided a digital-video device capable of operating in an all-digital environment. There is also provided a cost-efficient digital-video device that enables determinable bitrate, quality and format conversion. Among still further aspects of an embodiment of the present invention, the aforementioned features are provided with reduced computational requirements which are susceptible to hardware and/or software implementations under effective user and/or automatic (e.g. hardware and/or programmatic) control.
In also another embodiment of the present invention, a digital-VIDEO DEVICE employs an MPEG-2 compliant transcoder that includes simplified cascaded decoder and encoder functionality, and is capable of performing determinable bitrate re-encoding and other processing without conducting motion estimation. During recording, the decoder receives and processes a compressed source bitstream to produce a decoded bitstream that includes reconstructed video and preserved motion vectors. The encoder xe2x80x9cre-encodesxe2x80x9d the decoded bitstream using the preserved motion vectors and performs any applicable bitrate modifications. The re-encoded bitstream is then stored. During playback, the transcoder-based decoder, or an additional decoder, decodes a stored bitstream, which is then output in digital and/or analog form. Various extended play, re-recording and other features are also provided.
Another embodiment of the present invention provides a method for determining an optimal re-encode quantization parameter, comprising:
receiving a decoded quantization parameter, Q1, of a bitstream portion;
receiving a re-encode quantization parameter, Q2, of the bitstream portion;
comparing Q1 to Q2; and
selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter.
Another aspect of the present invention includes a method for forming a re-encoded bitstream portion, comprising:
(a) receiving a compressed bitstream portion having a first quantization parameter, Q1;
(b) initiating decoding of the compressed bitstream portion to produce the first quantization parameter, Q1, and an inverse quantization output;
(c) initiating re-encoding of the decoded bitstream portion to form a second quantization parameter, Q2, and a quantization input;
(d) determining that Q2 is less than Q1;
(e) determining that the inverse quantization output is substantially equal to the quantization input;
(f) copying the compressed bitstream portion to produce a re-encoded bitstream portion; and
(g) reconstructing the bitstream portion to form a reconstructed bitstream portion and storing the reconstructed bitstream portion in a frame buffer.
A further embodiment of the present invention comprises a computer readable storage medium storing program code for causing a processing system to perform the steps of:
receiving a decoded quantization parameter, Q1, of a bitstream portion;
receiving a re-encode quantization parameter, Q2, of the bitstream portion;
comparing Q1 and Q2; and
selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than or equal to Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter.
A transcoder is also provided in accordance with another embodiment of the present invention. The transcoder comprising:
a decoder for producing a coding parameter of a received bitstream portion; and
an encoder coupled to the decoder for producing a re-encode parameter corresponding to the received bitstream portion, comparing the re-encode parameter to the coding parameter and copying the received bitstream portion to re-encode bitstream according to a predetermined determined correspondence between the parameters.
Another aspect of the transcoder includes:
means for receiving a decoded quantization parameter, Q1, of a bitstream portion;
means for receiving a re-encode quantization parameter, Q2, of the bitstream portion;
means for comparing Q1 and Q2 and means for selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter.
Further embodiment of the present invention includes a method for forming a re-encoded bitstream portion, comprising:
(a) receiving a compressed bitstream portion having a first quantization parameter, Q1;
(b) initiating decoding of the compressed bitstream portion to produce the first quantization parameter, Q1, and an inverse quantization output;
(c) initiating re-encoding of the decoded bitstream portion to form a second quantization parameter, Q2, and a quantization input;
(d) determining that Q2 is less than Q1;
(e) determining that the inverse quantization output is unequal to the quantization input;
(f) determining that the bitstream portion corresponds to a B-picture;
(g) copying the compressed bitstream portion to produce a re-encoded bitstream portion; and
(h) reconstructing the bitstream portion to form a reconstructed bitstream portion and storing the reconstructed bitstream portion in a frame buffer.
The present invention in another aspect includes a method for disposing of spare bits resulting from transcoding, comprising:
receiving a decoded quantization parameter, Q1, of a bitstream portion;
receiving a re-encode quantization parameter, Q2, of the bitstream portion;
determining that Q1 is greater than Q2;
selecting Q1 as a replacement re-encode quantization parameter; and
passing spare bits resulting from the replacement to another bitstream portion.
The foregoing provisions along with various ancillary provisions and features will become apparent to those skilled in the art as the following description proceeds, are attained by is novel system and methods, a preferred embodiment thereof shown with reference to the accompanying drawings.